<template>
    <div>
        <a-modal
         v-model:visible="visible" 
         title="车间使用记录" 
         @ok="visible = false" 
         @cancel="visible = false"
         class="enterprise-add-edit-modal"
         :width="800"
         :footer="null"
        >
            <div v-if="visible">
                <commpVxeTable
                    :key="refreshTable"
                    ref="headmanVxeTable"
                    :config="{
                        api:assessCheckApi.spcyQyInfoquerySccjjlPageList,
                        rowId: 'id',
                        paramet:{
                            fsccjid:formState.id,
                        }
                    }" 
                    :isCanWrap="true"
                    :columns="monitorColumnsVxe" 
                    :formItem="[]"
                    :occupancyHeight="60"
                >  
                    <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                        <a-form layout="inline" class="search-form" >
                            <a-form-item v-if="!formState.isDisabled">
                                <a-button class="red-btn" type="primary" @click="deleteClick(row,0)" >删除</a-button>
                            </a-form-item>
                        </a-form> 
                    </template>
                </commpVxeTable>
            </div>
            <div style="
                display: flex; justify-content: flex-end;
                margin-top: 20px; width: 100%;
                background-color: #fff;">
                <a-button @click="visible = false">取消</a-button>
            </div>
        </a-modal>
    </div>
</template>
<script>
import assessCheckApi from '../service/api'
import moment from 'moment'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
export default {
    components:{
        commpVxeTable,
    },
    props:{

    },
    data(){
        return{
            assessCheckApi:assessCheckApi,
            visible:false,
            formState:{},
            refreshTable:null,
            monitorColumnsVxe:[{
                title: '工序环节名称',
                field: 'fgxhjmc',
            },{
                title: '使用开始时间',
                field: 'fsykssj',
            },{
                title: '使用结束时间',
                field: 'fsyjssj',
            }]
        }
    },
    watch:{

    },
    mounted(){
    },
    methods:{
        getData(val){
            this.formState = {}
            this.formState = val
        },
    }
}
</script>
<style lang="less">
.enterprise-add-edit-modal{
    .add-edit-form{
        display: flex;
        flex-wrap: wrap;
        .ant-form-item{
            display: flex;
        }
        .ant-form-item-label{
            width: 85px;
        }
        .ant-form-item-control-wrapper{
            width: 180px;
        }
        .flex-1-box{
            width: 100%;
            .ant-form-item-control-wrapper{
                flex: 1;
            }
        }
    }
}
</style>